let term = {
  title: {
    placeholderSearch: {
      value: '请输入过滤条件',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.title.placeholderSearch',
    },
    choiseExportData: {
      value: '请选择导出字段',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.title.choiseExportData',
    },
    checkCdo: {
      value: '导入控件配置不完整，请选择CDO',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.checkCdo',
    },
    checkDQ: {
      value: '导出控件配置不完整，请选择DQ',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.checkDQ',
    },
    isloading: {
      value: '正在导入...',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.isloading',
    },
    notify: {
      value: '提示',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.notify',
    },
    refreshSuccess: {
      value: '数据刷新成功',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.refreshSuccess',
    },
    refresh: {
      value: '刷新',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.refresh',
    },
    importAndExport: {
      value: '导入导出',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.title.importAndExport',
    },
    import: {
      value: '导入',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.import',
    },
    notConfigured: {
      value: '导入导出尚未配置',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.notConfigured',
    },
    downloadImportantTemplate: {
      value: '下载导入模板',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.title.downloadImportantTemplate',
    },
    ImportantTemplate: {
      value: '导入模板',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.title.ImportantTemplate',
    },
    export: {
      value: '导出',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.export',
    },
    taskList: {
      value: '任务列表',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.taskList',
    },
    noDataToDisplay: {
      value: '没有要现实的数据',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.title.noDataToDisplay',
    },
    noData: {
      value: '暂无数据',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.noData',
    },
    importTask: {
      value: '导入任务',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.importTask',
    },
    importDes: {
      value: '系统将默认保留文件3个月，请及时处理',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.importDes',
    },
    clearnImportTask: {
      value: '清空导入任务',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.title.clearnImportTask',
    },
    loading: {
      value: '加载中',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.loading',
    },
    successTip: {
      value: '成功',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.successTip',
    },
    someSuccess: {
      value: '部分成功',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.someSuccess',
    },
    failTips: {
      value: '失败',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.failTips',
    },
    retry: {
      value: '重试',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.retry',
    },
    download: {
      value: '下载',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.download',
    },
    exportTask: {
      value: '导出任务',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.exportTask',
    },
    clearnExportTask: {
      value: '清空导出任务',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.title.clearnExportTask',
    },
    close: {
      value: '关闭',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.close',
    },
    importException: {
      value: '导入异常',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.title.importException',
    },
    optionalField: {
      value: '可选字段',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.optionalField',
    },
    exportField: {
      value: '导出字段',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.exportField',
    },
    exportCurrectpage: {
      value: '导出当前页面数据',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.title.exportCurrectpage',
    },
    exportAll: {
      value: '导出全部数据',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.exportAll',
    },
    Alternate: {
      value: '备选项',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.Alternate',
    },
    RowNum: {
      value: 'Excel行号',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.RowNum',
    },
    ErrMsg: {
      value: '导入错误信息',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.ErrMsg',
    },
    State: {
      value: '状态',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.State',
    },
    exportTaskName: {
      value: '导出任务名称',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.exportTaskName',
    },
    FileName: {
      value: '文件名',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.FileName',
    },
    FileSize: {
      value: '文件大小',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.FileSize',
    },
    RowNums: {
      value: '导出行数',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.RowNums',
    },
    ElapsedSeconds: {
      value: '耗时(秒)',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.ElapsedSeconds',
    },
    ExportTime: {
      value: '导出时间',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.ExportTime',
    },
    ExportErrMsg: {
      value: '失败原因',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.ExportErrMsg',
    },
    operation: {
      value: '操作',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.operation',
    },
    SuccessCount: {
      value: '成功行数',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.SuccessCount',
    },
    FailedCount: {
      value: '失败行数',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.FailedCount',
    },
    ImportTime: {
      value: '导入时间',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.ImportTime',
    },
    haveInHand: {
      value: '进行中',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.haveInHand',
    },
    partiallySuccess: {
      value: '部分成功',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.title.partiallySuccess',
    },
    confirm: {
      value: '确定',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.title.confirm',
    },
  },
  notify: {
    exportSuccess: {
      value: '导出任务【{Template}】已提交，请前往任务列表下载',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.notify.exportSuccess',
    },
    exportMessage: {
      value: '是否要执行',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.notify.exportMessage',
    },
    exportMessage1: {
      value: '条数据的导入',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.notify.exportMessage1',
    },
    deletionTask: {
      value: '删除任务',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.notify.deletionTask',
    },
    deleteThisData: {
      value: '删除本条数据',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.notify.deleteThisData',
    },
    clearTask: {
      value: '清空任务列表',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.notify.clearTask',
    },
    clearImportTask: {
      value: '清空导入任务列表',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.notify.clearImportTask',
    },
    sureClearImportTask: {
      value: '确定要清空导入任务列表吗',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.notify.sureClearImportTask',
    },
    clearnImportSuccess: {
      value: '导入任务列表清空成功',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.notify.clearnImportSuccess',
    },
    clearExportTask: {
      value: '清空导出任务列表',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.notify.clearExportTask',
    },
    sureClearExportTask: {
      value: '确定要清空导出任务列表吗',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.notify.sureClearExportTask',
    },
    clearnExportSuccess: {
      value: '导出任务列表清空成功',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.notify.clearnExportSuccess',
    },
    isImporting: {
      value: '正在导入...',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.notify.isImporting',
    },
    cancel: {
      value: '取消',
      ReferenceExpr: 'Schema.Controls.fas_advquery_1_1.Terms.title.cancel',
    },
    gotIt: {
      value: '知道了',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.notify.gotIt',
    },
    importFail: {
      value: '导入失败,失败原因',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.notify.importFail',
    },
    failReason: {
      value: '失败原因',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.notify.failReason',
    },
    importSuccess: {
      value: '已创建导入任务',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.notify.importSuccess',
    },

    openTask: {
      value: '打开任务列表',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.notify.openTask',
    },
    addExportFail: {
      value: '添加到导出任务列表失败',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.notify.addExportFail',
    },
  },
  placeholder: {
    choise: {
      value: '请选择',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.placeholder.choise',
    },
  },
  pageSize: {
    show: {
      value: '显示',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.pageSize.show',
    },
    strip: {
      value: '条',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.pageSize.strip',
    },
    total: {
      value: '共',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.pageSize.total',
    },
    perPage: {
      value: '每页',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.pageSize.perPage',
    },
    homePage: {
      value: '首页',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.pageSize.homePage',
    },
    previousPage: {
      value: '前页',
      ReferenceExpr:
        'Schema.Controls.export_import.Terms.pageSize.previousPage',
    },
    nextPage: {
      value: '后页',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.pageSize.nextPage',
    },
    lastPage: {
      value: '末页',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.pageSize.lastPage',
    },
    page: {
      value: '页',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.pageSize.page',
    },
    to: {
      value: '到第',
      ReferenceExpr: 'Schema.Controls.export_import.Terms.pageSize.to',
    },
  },
};

const initialValue = window.localMessage ? localMessage['fas_common'] : {};
export const Terms = term;
export const TermsTranslated = {};
for (let i in term) {
  TermsTranslated[i] = {};
  for (let j in term[i]) {
    let data = term[i][j].ReferenceExpr.split('.').reduce((prev, cur) => {
      try {
        if (!!prev[cur]) {
          return prev[cur];
        } else {
          return term[i][j].value;
        }
      } catch (error) {
        return term[i][j].value;
      }
    }, initialValue);
    TermsTranslated[i][j] = data;
  }
}
